package com.example.g2daylx2

import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import androidx.lifecycle.lifecycleScope
import com.alibaba.android.arouter.facade.annotation.Route
import com.example.g2daylx2.bvm.CarViewModel
import com.example.g2daylx2.databinding.ActivityCarBinding
import com.example.g2daylx2.fg.one.Parkadapter
import com.example.lib_base.net.mvvm.BaseActivity
import dagger.hilt.android.AndroidEntryPoint
import kotlinx.coroutines.flow.collect
import kotlinx.coroutines.launch
import org.xml.sax.helpers.ParserAdapter
@Route(path = "/app/CarActivity")
@AndroidEntryPoint
class CarActivity : BaseActivity<ActivityCarBinding,CarViewModel>() {
    val parAdapter by lazy { Parkadapter() }
    override fun initView() {
        binding.rv.apply {
            adapter = parAdapter
        }
        lifecycleScope.launch {
            vm.getCar("标准车位").collect(){
                parAdapter.submitData(it)
            }
        }
    }

    override fun initData() {

    }

}